<!DOCTYPE html>
<html lang="zh-cmn-Hans">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<title>鹿程智慧油站商户平台</title>
		<meta name="description" content="鹿程科技是提供加油站互联网化零管系统、营销及支付和大数据分析运营服务的行业领先科技公司。鹿程科技充分了解加油站行业的需求和新兴互联网的发展,依靠业内最先进的科技和标准化的运营,持续帮助油站业务发展创造价值。"/>
		<meta name="keywords" content="智慧油站,鹿程,鹿程智慧油站,鹿程智慧油站微信支付,加油站微信支付,加油站营销管理"/>
		<link rel="icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
		<link rel="shortcut icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
		<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
		<link rel="stylesheet" href="../layui/css/layui.css" />
		<link rel="stylesheet" href="../css/style.css" />
	</head>
<body>
	<section class="section-right">
		<!--deer-tit-->
		<div class="deer-tit">
			<h3>油枪设置</h3>
			<h5>所有油枪</h5>
			<h4>添加油枪</h4>
		</div>
		<!--/deer-tit-->
		<!--deer-content-->
		<div class="deer-content">
			<div class="ware-add">
				<form action="#" class="layui-form ware-add-form sys-add-form">
					<dl>
					    <dt>油枪号</dt>
					    <dd><input type="text" name="number" value="" lay-verify="required" lay-verType="tips" placeholder="1" autocomplete="on" class="layui-input"></dd>
				    </dl>
				    <dl>
					    <dt>油品型号</dt>
					    <dd>
					    	<select name="system_petrol">
	                        <option value="0">请选择</option> 
	                        <option value="1">国四 90# 汽油</option>
	                        <option value="2">国四 93# 汽油</option>
	                        <option value="3">国四 97# 汽油</option>
	                        <option value="4">国五 92# 汽油</option>
	                        <option value="5">国五 95# 汽油</option>
	                        <option value="6">国五 98# 汽油</option>
	                        <option value="7">国四 5# 柴油</option>
	                        <option value="8">国四 0# 柴油</option>
	                        <option value="9">国四 -10# 柴油</option>
	                        <option value="10">国四 -20# 柴油</option>
	                        <option value="11">国四 -35# 柴油</option>
	                        <option value="12">国四 -50# 柴油</option>
	                        <option value="13">国五 5# 柴油</option>
	                        <option value="14">国五 0# 柴油</option>
	                        <option value="15">国五 -10# 柴油</option>
	                        <option value="16">国五 -20# 柴油</option>
	                        <option value="17">国五 -35# 柴油</option>
	                        <option value="18">国五 -50# 柴油</option>
	                        <option value="19">国六 101# 汽油</option>
                    		</select>
					    </dd>
				    </dl>
				    <dl>
				    	<dt>价格</dt>
				    	<dd><input type="text"  name="price" value="" lay-verify="required|number" lay-verType="tips" placeholder="1" autocomplete="on" class="layui-input"><i class="musts">*</i><span>&nbsp;本店价格</span></dd>
				    </dl>
				    <dl>
				    	<dt>市场价格</dt>
				    	<dd><input type="text" name="market_price" value="" lay-verify="required|number" lay-verType="tips" placeholder="22" autocomplete="on" class="layui-input"><i class="musts">*</i><span>&nbsp;品牌价格</span></dd>
				    </dl>
				    <dl>
				    	<dt>每升优惠</dt>
				    	<dd><input type="text" name="preferential" value="" lay-verify="required|number" lay-verType="tips" placeholder="0.1" autocomplete="on" class="layui-input"></dd>
				    </dl>
				    <dl>
				    	<dt>大型客户优惠</dt>
				    	<dd><input type="text" name="max__preferential" value="" lay-verify="required|number" lay-verType="tips" placeholder="0" autocomplete="on" class="layui-input"></dd>
				    </dl>
				    <dl>
				    	<dt>消费一元赠送成长值</dt>
				    	<dd><input type="text" name="gasoline_growth" value="" lay-verify="required|number" lay-verType="tips" placeholder="0" autocomplete="on" class="layui-input"></dd>
				    </dl>
				    <dl>
				    	<dt>消费一元赠送积分</dt>
				    	<dd><input type="text" name="gasoline_integral" value="" lay-verify="required|number" lay-verType="tips" placeholder="0" autocomplete="on" class="layui-input"></dd>
				    </dl>
				    <dl>
				    	<dt>请选择加油员</dt>
				    	<dd>
					      <input type="checkbox" name="lucheng1" value="1" title="鹿程001">
					      <input type="checkbox" name="lucheng2" value="2" title="鹿程002">
					      <input type="checkbox" name="lucheng3" value="3" title="鹿程003">
					      <input type="checkbox" name="lucheng4" value="4" title="鹿程004">
					      <input type="checkbox" name="lucheng5" value="5" title="鹿程005">
					      <input type="checkbox" name="lucheng6" value="6" title="鹿程006">
					      <input type="checkbox" name="lucheng7" value="7" title="鹿程007">
					    </dd>
				    </dl>
					<button class="submit" lay-submit lay-filter="Submit" lay-verify="checkboxs" >提交</button>
				</form>
			</div>
		</div>
		<!--/deer-content-->
	</section>
	
	<!--js-->
	<aside>
		
		<script type="text/javascript" src="../layui/layui.js" ></script>
		<script type="text/javascript">
			
			layui.use(['form','jquery'],function(){
				var	form=layui.form;
				var $=layui.jquery;
				
				//表单验证
				form.verify({
					checkboxs:function(){
						if($('.ware-add-form>dl>p>div').hasClass('layui-form-checked')){
							return false
						}else{
							return '您尚未选择加油员'
						}
					}
		 		})
				
				//表单提交
				form.on('submit(Submit)', function(data){
					console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
					
					$.ajax({
			            url: '/',
			            data: data.field,
			            type: 'post',
			            datatype: 'json',
			            success: function (res) {
			                if (res.code == 1) {
			                	
			                	layer.msg(res.msg);
			                    return;
			                }
				            }
				        });
					return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
				});
				
				
				
				
			})
			
		</script>
		
		
		
	</aside>
	<!--/js-->
</body>
</html>